package start.eventbus;

import com.google.common.eventbus.Subscribe;

public class EventListener03 {


    /**

     * 监听 Integer 类型的消息

     */

    @Subscribe

    public void listenInteger(Integer param) {
        System.out.println(Thread.currentThread().getName());
        System.out.println(this.getClass().getSimpleName() + "#listenInteger ->" + param);

    }

    /**

     * 监听 String 类型的消息

     */

    @Subscribe

    public void listenString(String param) {
        System.out.println(this.getClass().getSimpleName() + "#listenString ->" + param);

    }

}